package com.etone.smartAudit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.etone.smartAudit.domain.DataMetaTask;
import com.etone.smartAudit.enums.CheckState;
import com.etone.smartAudit.vo.dataMetaTask.DataMetaTaskListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author: sovy
 * @date: 2020/11/23
 * @description:
 */

@Mapper
public interface DataMetaTaskMapper extends BaseMapper<DataMetaTask> {
    /**
     * 数据入库记录列表
     *
     * @param adminId
     * @param isAuto
     * @param taskName
     * @param startCreateTime
     * @param endCreateTime
     * @param state
     * @return
     */
    List<DataMetaTaskListVO> findList(@Param("adminId") Integer adminId, @Param("isAuto") Boolean isAuto, @Param("taskName") String taskName, @Param("startCreateTime") Date startCreateTime, @Param("endCreateTime") Date endCreateTime, @Param("state") CheckState state);

    /**
     * 改变状态
     *
     * @param id
     * @param state
     * @return
     */
    int updateCheckState(@Param("id") Integer id, @Param("state") CheckState state);

    /**
     * @param id
     * @param state
     * @param result
     * @param execAdminId
     * @param execAdminNickName
     * @return
     */
    int auditResult(@Param("id") Integer id, @Param("state") CheckState state, @Param("result") String result, @Param("execAdminId") Integer execAdminId, @Param("execAdminNickName") String execAdminNickName);
}